FROM node:22-alpine3.21 AS build

COPY . /app

RUN set -e \
    && yarn config set registry https://registry.npmmirror.com \
    && cd /app \
    && yarn install \
    && yarn build

FROM nginx:alpine

COPY --from=build /app/.output/server /usr/share/nginx/html